package com.chris.core.socket.bio.service;

import com.chris.core.socket.bio.util.BioSokcetClientUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.io.IOException;

/**
 *
 */
@Service
public class SokcetBioClientService  {

    Logger log = LoggerFactory.getLogger(this.getClass());

    public  BioSokcetClientUtil sokcet = new BioSokcetClientUtil("127.0.0.1", 10101,300000,false,"\r\n") {
        @Override
        public void OnRevice(String msg) {
            log.debug("客户端->读取->服务端:-->内容:" + msg);
        }
    };

    public SokcetBioClientService() throws IOException {
        sokcet.Open();
    }
}
